package top.cptr.so.aliyundomainserver.service;

import com.aliyun.alidns20150109.models.*;
import top.cptr.so.aliyundomainserver.aliyunSDKUtils.exception.CreateClientException;
import top.cptr.so.aliyundomainserver.aliyunSDKUtils.exception.RequestInterfaceException;

/**
 * resolverManage 解析管理接口
 */
public interface ResolverManage {
    /**
     * 获取解析记录列表
     *
     * @return
     */
    DescribeDomainRecordsResponseBody describeDomainRecords(String token, DescribeDomainRecordsRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 获取解析记录详细信息
     * @param token accessKey标识
     * @param requestParam 请求参数
     * @return 结果对象
     */
    DescribeDomainRecordInfoResponseBody describeDomainRecordInfo(String token, DescribeDomainRecordInfoRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 获取子域名解析记录列表
     * @param token
     * @param requestParam
     * @return
     * @throws CreateClientException
     * @throws RequestInterfaceException
     */
    DescribeSubDomainRecordsResponseBody describeSubDomainRecords(String token, DescribeSubDomainRecordsRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 添加解析记录
     * @param token
     * @param requestParam
     * @return
     * @throws CreateClientException
     * @throws RequestInterfaceException
     */
    AddDomainRecordResponseBody addDomainRecord(String token, AddDomainRecordRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 删除解析记录
     * @param token
     * @param requestParam
     * @return
     * @throws CreateClientException
     * @throws RequestInterfaceException
     */
    DeleteDomainRecordResponseBody deleteDomainRecord(String token, DeleteDomainRecordRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 修改解析记录
     *
     * @param token
     * @param requestParam
     * @return
     * @throws CreateClientException
     * @throws RequestInterfaceException
     */
    UpdateDomainRecordResponseBody updateDomainRecord(String token, UpdateDomainRecordRequest requestParam) throws CreateClientException, RequestInterfaceException;

    /**
     * 删除子域名解析记录
     * @param token
     * @param requestParam
     * @return
     * @throws CreateClientException
     * @throws RequestInterfaceException
     */
    DeleteSubDomainRecordsResponseBody deleteSubDomainRecords(String token, DeleteSubDomainRecordsRequest requestParam) throws CreateClientException, RequestInterfaceException;
}
